/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.agilelang.editor.listener;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
import org.agilelang.editor.ViewFrame;
/*import org.agilelang.generator.cakephp.DlgGenerateCakePHP;
import org.agilelang.generator.cakephp.ICakePHP;
import org.agilelang.generator.javastruts2.DlgGenerateStruts2;
import org.agilelang.generator.javastruts2.IJavaStruts2;*/

/**
 *
 * @author RODERICK
 */
public class GenerateStruts2 implements ActionListener {

    ViewFrame frame;

    public GenerateStruts2(ViewFrame frame) {
        this.frame = frame;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        frame.save();
        Compile.scanner_parser(frame.getPathProject());
        
        /*DlgGenerateStruts2 dlg = new DlgGenerateStruts2();
        dlg.setLocationRelativeTo(null);
        dlg.setVisible(true);
        if (dlg.isStatus()) {
            IJavaStruts2 test = new IJavaStruts2(frame.getPathProject() + "/out/meta.xml", dlg.getPath());
            test.setTemplate("bootstrap");
            test.processFile();
            test.processController();
            test.processModel();
            test.processMenu();
            Compile.generatesql(frame.getPathProject() + "/out/meta.xml");
            
            JOptionPane.showMessageDialog(null, "Finish generation",
                    "Info", JOptionPane.INFORMATION_MESSAGE);
        }   */            
        
        
    }


}